﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Methods;

namespace AMatysiakTest.Methods.TypeExtensions
{
    [TestClass]
    public class Equality
    {
        [TestMethod]
        public void testEmptyArrays()
        {
            int[] a = new int[] {};
            int[] b = new int[] {};

            Assert.IsTrue(a.Equality(b));
        }

        [TestMethod]
        public void testDiffTypesArrays()
        {
            int[] a = new int[] { 17 };
            string[] b = new string[] { "a" };

            Assert.IsFalse(a.Equality(b));
        }

        [TestMethod]
        public void testDiffLengthArrays()
        {
            int[] a = new int[] { 17, 7 };
            int[] b = new int[] { 1988 };

            Assert.IsFalse(a.Equality(b));
        }

        [TestMethod]
        public void testIntArrays()
        {
            int[] a = new int[] { 2, 3 };
            int[] b = new int[] { 2, 3 };

            Assert.IsTrue(a.Equality(b));
        }

        [TestMethod]
        public void testDoubleArrays()
        {
            double[] a = new double[] { 2.5, 3 };
            double[] b = new double[] { 2.5, 3 };

            Assert.IsTrue(a.Equality(b));
        }

        [TestMethod]
        public void testStringArrays()
        {
            string[] a = new string[] { "2", "3" };
            string[] b = new string[] { "2", "3" };

            Assert.IsTrue(a.Equality(b));
        }
    }
}
